package com.ruoyi.logistic.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.NetworkPrePayDealSheet;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.logistic.domain.vo.NetworkPrePayDealSheetVo;
import com.ruoyi.logistic.mapper.NetworkPrePayDealSheetMapper;
import com.ruoyi.logistic.service.NetworkPrePayDealSheetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NetworkPrePayDealSheetServiceImpl implements NetworkPrePayDealSheetService {
    @Autowired
    private NetworkPrePayDealSheetMapper networkPrePayDealSheetMapper;
    @Override
    public List<NetworkPrePayDealSheet> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return networkPrePayDealSheetMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkPrePayDealSheet sheet) {
        return networkPrePayDealSheetMapper.insert(sheet);
    }

    @Override
    public Boolean update(NetworkPrePayDealSheet sheet) {
        return networkPrePayDealSheetMapper.update(sheet);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkPrePayDealSheetMapper.deleteById(id);
    }

    @Override
    public NetworkPrePayDealSheet findById(Integer id) {
        return networkPrePayDealSheetMapper.findById(id);
    }

    @Override
    public List<NetworkPrePayDealSheet> search(NetworkPrePayDealSheetVo vo) {
        PageHelper.startPage(vo.getPageDate());
        List<NetworkPrePayDealSheet> sheets = networkPrePayDealSheetMapper.search(vo);
        return sheets;
    }
}
